#include "pwm.h"
void delay_ms(unsigned int ms)
{
	unsigned int i,j;
	for(i = 0; i < ms; i++)
		for(j = 0; j < 1800; j++);
}


int main()
{
	// 调用硬件初始化的函数
    hal_pwm_init();
    hal_pwm_option(T2, T_MANUAL, ON);
	while(1)
	{

        hal_pwm_waves(T2, 500, 100);
        hal_pwm_option(T2, T_AUTO, ON);

        delay_ms(500);

        hal_pwm_waves(T2, 800, 200);
        hal_pwm_option(T2, T_AUTO, ON);


	}
	return 0;
}
